<!--{eval $_TPL['titles'] = array('公司');}-->
<!--{template header}-->

<!-- main -->

<div class="tab" id="comp_list">
	<div id="mainarea">
		<div class="tabs_header">
			<ul class="tabs">
				<li class="active"><a href="cp.php?ac=ships"><span>发布空船信息</span></a></li>
				<li><a href="space.php?do=ships"><span>返回信息列表</span></a></li>
			</ul>
		</div>
		<!--{if $op == "delete"}-->
		<div>
			<form method="post" name="eventform" action="cp.php?ac=ships&op=delete&id=$eventid">
				<h1>您确定取消此活动吗？</h1>
				<p>活动取消将删除所有活动相关信息。<br />此操作不可恢复！</p>
				<p class="btn_line"><br />
					<input type="hidden" name="refer" value="$_SGLOBAL[refer]">
					<input type="submit" name="deletesubmit" value="确定" class="submit" />
					<input type="button" name="btnclose" value="取消" onclick="hideMenu();" class="button" />
				</p>
				<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
			</form>
		</div>
		<!--{else}-->
		<div class="c_form">
			<form id="edit_form" name="edit_form" method="post" enctype="multipart/form-data" action="cp.php?ac=ships&id=$eventid">
				<table class="infotable" width="100%" cellspacing="6" cellpadding="6" >	
					<tbody>
						<tr>
							<th>信息标题</th>
							<td>
								<input class="t_input" id="title" name="title" value="$ships[title]" size="45" type="text" maxlength="80"><font color="red">&nbsp;&nbsp;*</font>
							</td>
						</tr>
						<tr>
							<th>贸易类型</th>
							<td>
								<select name="inout" id="inout" >
									<option value="1" {if $ships[inout]==1 } selected {/if}>外贸货盘</option>
									<option value="2" {if $ships[inout]==2 } selected {/if}>内贸货盘</option>
								</select><font color="red">&nbsp;&nbsp;*</font>
							</td>
						</tr>
						<tr>
							<th>船舶名称</th>
							<td>
								<input class="t_input" id="ship_name" name="ship_name" value="$ships[ship_name]" size="45" type="text" maxlength="80"><font color="red">&nbsp;&nbsp;*</font>
							</td>
						</tr>
						<tr>
							<th>船舶类型</th>
							<td >
								<select name="ship_type" id="ship_type" >
								  <option value="散货船">散货船</option>
								  <option value="散装水泥船">散装水泥船</option>
								  <option selected value="杂货船">杂货船</option>
								  <option value="集装箱船">集装箱船</option>
								  <option value="油船">油船</option>
								  <option value="化学品船">化学品船</option>
								  <option value="液化气船">液化气船</option>
								  <option value="滚装船">滚装船</option>
								  <option value="多用途船">多用途船</option>
								  <option value="捕捞船">捕捞船</option>
								  <option value="冷藏船">冷藏船</option>
								  <option value="拖船">拖船</option>
								  <option value="其他船">其他船</option>
								</select>
								<font color="red">&nbsp;&nbsp;*</font>
							</td>
						</tr>
						<tr>
							<th>载重吨</th>
							<td>
								<input class="t_input" id="capacity" name="capacity" value="$ships[capacity]" size="20" type="text" maxlength="80">
							</td>
						</tr>
						<tr>
							<th>积载因数</th>
							<td>
								<input class="t_input" id="stow" name="stow" value="$ships[stow]" size="20" type="text" maxlength="80">
							</td>
						</tr>
					
						<tr>
							<th>装船港口</th>
							<td>
								<input class="t_input" id="loadport" name="loadport" value="$ships[loadport]" size="20" type="text" maxlength="80"><font color="red">&nbsp;&nbsp;*</font>
							</td>
						</tr>
						<tr>
							<th>卸船港口</th>
							<td>
								<input class="t_input" id="destin" name="destin" value="$ships[destin]" size="20" type="text" maxlength="80"><font color="red">&nbsp;&nbsp;*</font>
							</td>
						</tr>
						<tr>
							<th>空船区域 </th>
							<td id="citybox">
								<input class="t_input" id="shiparea" name="shiparea" value="$ships[shiparea]" size="45" type="text" maxlength="80"><font color="red">&nbsp;&nbsp;*</font>
							</td>
						</tr>
						<tr>
							<th>空船时间</th>
							<td>
								<script type="text/javascript" src="source/script_calendar.js" charset="$_SC[charset]"></script>
								<input type="text" name="starttime" id="starttime" value="<!--{eval echo sgmdate('Y-m-d H:i', $ships[statrtime])}-->"  onclick="showcalendar(event,this,1,'<!--{eval echo sgmdate('Y-m-d H:i', $_SGLOBAL[timestamp])}-->', '<!--{eval echo sgmdate('Y-m-d H:i', $_SGLOBAL[timestamp] + 3600 * 24 * 60)}-->')" />
							 至
								<input type="text" name="endtime" id="endtime" value="<!--{eval echo sgmdate('Y-m-d H:i', $ships[endtime])}-->"  onclick="showcalendar(event,this,1,'<!--{eval echo sgmdate('Y-m-d H:i', $_SGLOBAL[timestamp])}-->', '<!--{eval echo sgmdate('Y-m-d H:i', $_SGLOBAL[timestamp] + 3600 * 24 * 60)}-->')" /><font color="red">&nbsp;&nbsp;*</font>
							</td>
						</tr>
						<tr>
							<th>公司名称/个人姓名</th>
							<td>
								<input class="t_input" id="company" name="company" value="$ships[company]" size="45" type="text" maxlength="80"><font color="red">&nbsp;&nbsp;*</font>
							</td>
						</tr>
						<tr>
							<th>联系人</th>
							<td>
								<input class="t_input" id="linkman" name="linkman" value="$ships[linkman]" size="20" type="text" maxlength="80"><font color="red">&nbsp;&nbsp;*</font>
							</td>
						</tr>
						<tr>
							<th>联系电话</th>
							<td>
								<input class="t_input" id="phone" name="phone" value="$ships[phone]" size="20" type="text" maxlength="80"><font color="red">&nbsp;&nbsp;*</font>
							</td>
						</tr>
						<tr>
							<th>传   真 </th>
							<td>
								<input class="t_input" id="fax" name="fax" value="$ships[fax]" size="20" type="text" maxlength="80">
							</td>
						</tr>
						<tr>
							<th>邮   箱 </th>
							<td>
								<input class="t_input" id="email" name="email" value="$ships[email]" size="20" type="text" maxlength="80">
							</td>
						</tr>
						<tr>
							<th>备   注</th>
							<td colspan="2"><textarea class="userData" name="content" cols="50" rows="8">$ships[content]</textarea></td>
						</tr>
					</tbody>
				</table>
				<!--{if checkperm('seccode')}-->
				<table class="infotable" width="100%" cellspacing="6" cellpadding="6">
					<tbody>
					<!--{if $_SCONFIG['questionmode']}-->
					<tr>
						<th width="100" style="vertical-align: top;">请回答验证问题</th>
						<td>
							<p><!--{eval question();}--></p>
							<input type="text" id="seccode" name="seccode" value="" size="15" class="t_input" />
						</td>
					</tr>
					<!--{else}-->
					<tr>
						<th width="100" style="vertical-align: top;">请填写验证码</th>
						<td>
							<script type="text/javascript" charset="$_SC[charset]">seccode();</script>
							<p>请输入上面的4位字母或数字，看不清可<a href="javascript:updateseccode()">更换一张</a></p>
							<input type="text" id="seccode" name="seccode" value="" size="15" class="t_input" />
						</td>
					</tr>
					<!--{/if}-->
					</tbody>
				</table>
				<!--{/if}-->
				<table class="infotable" width="100%" cellspacing="4" cellpadding="4">
					<tbody>
						<tr>
							<th width="100">&nbsp;</th>
							<td>
								<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
								<input type="hidden" name="bnid" value="$id" />
								<input type="hidden" name="infosubmit" value="1" />
								<input class="submit" value="<!--{if $_GET[id]}-->保存<!--{else}-->提交<!--{/if}-->" type="button" onclick="check_eventpost()"/>
							</td>
						</tr>
					</tbody>
				</table>
			</form>
		</div>
		<!--{/if}-->
		<script type="text/javascript" src="image/editor/editor_function.js" charset="$_SC[charset]"></script>
		<script type="text/javascript" charset="$_SC[charset]">
			//检查提交
			function check_eventpost(){
				$("edit_form").submit();
			}
		</script>
	</div>
</div>

<!--{template footer}-->